<!DOCTYPE html>
<body>
  <div>
    <div>
      <p>This should be green.</p>
      <style scoped>
        p { color: green }
      </style>
    </div>
    <style scoped>
      p { color: red }
    </style>
  </div>
</body>
